import React, { lazy } from "react";
import {
  GoodJobO,
  VipCardO,
  ClosedEye,
  OrdersO,
  Contact,
} from "@react-vant/icons";
import { routeType } from "../type";
const Layout = lazy(() => import("../pages/layout/index"));
const Home = lazy(() => import("../pages/home/index"));
const My = lazy(() => import("../pages/my/index"));
const Knowledge = lazy(() => import("../pages/knowledge/index"));
const Infirmary = lazy(() => import("../pages/infirmary/index"));
const Login = lazy(() => import("../pages/login/index"));
const Kepuhao = lazy(() => import("../pages/kepuhao/index"));
const Knowledgedetails = lazy(() => import("../pages/Knowledgedetails/index"));
const KnowledgeViewall = lazy(() => import("../pages/Viewall/index"));
const KonwledSearch = lazy(() => import("../pages/konwledSearch/index"));
const Kepuhaozhu = lazy(() => import("../pages/kepuhaozhu/index"));
const Kepuhaohui = lazy(() => import("../pages/kepuhaohui/intex"));
const Kepuhaogaun = lazy(() => import("../pages/kepuhaoguan/index"));
const Kepuhaomy = lazy(() => import("../pages/kepuhaomy/index"));
const Kepuhaomyzan = lazy(
  () => import("../pages/kepuhaomy/kepuhaomyzan/index")
);
const Chartlt = lazy(() => import("../pages/chartlt/index"));
const Chartltkf = lazy(() => import("../pages/chartkf/index"));
const Shenzhi = lazy(() => import("../pages/shenzhi/index"));
const Wodeshi = lazy(() => import("../pages/wodeshi/index"));
const Order = lazy(() => import("../pages/order/index"));
const Kepuhaoxq = lazy(() => import("../pages/kepuhaoxq/index"));
const Kepuhaoxqxq = lazy(() => import("../pages/kepuhaoxqxq/index"));
const Pay = lazy(() => import("../pages/pay/index"));
const Addhuanzhe = lazy(() => import("../pages/addhuanzhe/index"));
const Cunhuanzhe = lazy(() => import("../pages/cunhuanzhe/index"));
const HomeSearch = lazy(() => import("../pages/homesearch/index"));
const MyMessage = lazy(() => import("../pages/mymessage/index"));
const Detailsofpopularscience = lazy(
  () => import("../pages/Detailsofpopularscience/index")
);
const Doctorsattention = lazy(() => import("../pages/doctorsattention/index"));
const Huanzhegl = lazy(() => import("../pages/huanzhegl/index"));
const Huanzhejia = lazy(() => import("../pages/huanzhejia/index"));
const Mymessage = lazy(() => import("../pages/mymessage/index"));
const Siren = lazy(() => import("../pages/siren/index"));
const Sryisheng = lazy(() => import("../pages/sryisheng/index"));
const Pinpayment = lazy(() => import('../pages/Pinpayment/index'))
const Review = lazy(() => import('../pages/review/index'))
const Diagnosiscomment = lazy(() => import('../pages/diagnosiscomment/index'))
const Recommendeddoctor = lazy(() => import('../pages/recommendeddoctor/index'))
const Recommendedhospital = lazy(() => import('../pages/recommendedhospital/index'))
const RecommendeddoctorFind = lazy(() => import('../pages/recommendeddoctorFind/index'))
// const Pinpayment = lazy(() => import("../pages/Pinpayment/index"));
// const Review = lazy(() => import("../pages/review/index"));
const Phonelogin = lazy(() => import("../pages/phonelogin/index"));
const Zjzbmz = lazy(() => import("../pages/zjzbmz/index"));
const CityList = lazy(() => import("../pages/citylist/index"));
const Zbyy = lazy(() => import("../pages/home/zbyy/index"));
const Kepuhaodating = lazy(
  () => import("../pages/kepuhaozhu/kepuhaodating/index")
);
const Kepuhaodatingsearch = lazy(
  () => import("../pages/kepuhaozhu/kepuhaodatingsearch/index")
);
const KuaiSui = lazy(() => import("../pages/home/kuaisui/index"));
const KaiYiao = lazy(() => import("../pages/home/kaiyiao/index"));
const TySj = lazy(() => import("../pages/home/tysj/index"));
const WeiJianWei = lazy(() => import("../pages/home/weijianwei/index"));
const KfXl = lazy(() => import("../pages/kfxlhlyyyy/kfxl/index"));
const IdentificationDetails = lazy(() => import("../pages/Identificationdetails/index"))
const ZbyzDetatils = lazy(() => import("../pages/home/zbyzdetatils/index"))
const BxList = lazy(() => import("../pages/home/zbyzdetatils/bxlist/index"))
const JyZx = lazy(() => import("../pages/home/jyzx/index"))
const JyRw = lazy(() => import("../pages/home/jyrw/index"))
const Yhj = lazy(() => import("../pages/home/yhj/index"))
const Wzj = lazy(() => import("../pages/my/wzj/index"))
//科普号的路由
const Liaotianshi = lazy(() => import("../pages/liaotianshi/index"));
const Yuer = lazy(() => import("../pages/yuer/index"));
const Jiuzhen = lazy(() => import("../pages/jiuzhen/index"));
const Shuoming = lazy(() => import("../pages/shuoming/index"));
const Wodeys = lazy(() => import("../pages/wodeys/index"));
const Doxiao = lazy(() => import("../pages/doxiao/index"));
const Xiangqing = lazy(() => import("../pages/xiangqing/index"));
const Zhaoyiyuan = lazy(() => import("../pages/zhaoyiyuan/index"));
const AnYiYuanZhao = lazy(() => import("../pages/home/anyiyuanzhao/index"));
export const routeskepuhao: routeType[] = [
  {
    path: "/kepuhaozhu",
    element: <Kepuhaozhu />,
    meta: {
      label: "主页",
      icon: <GoodJobO />,
    },
  },
  {
    path: "kepuhaohui",
    element: <Kepuhaohui />,
    meta: {
      label: "患友会",
      icon: <VipCardO />,
    },
  },
  {
    path: "kepuhaoguan",
    element: <Kepuhaogaun />,
    meta: {
      label: "关注",
      icon: <OrdersO />,
    },
  },
  {
    path: "kepuhaomy",
    element: <Kepuhaomy />,
    meta: {
      label: "我的",
      icon: <OrdersO />,
    },
  },
];
//二级路由
export const routesChildren: routeType[] = [
  {
    path: "/",
    element: <Home />,
    meta: {
      label: "首页",
      icon: <GoodJobO />,
    },
  },
  {
    path: "/infirmary",
    element: <Infirmary />,
    meta: {
      label: "医务室",
      icon: <VipCardO />,
    },
  },
  {
    path: "/knowledge",
    element: <Knowledge />,
    meta: {
      label: "知识",
      icon: <OrdersO />,
    },
  },
  {
    path: "/my",
    element: <My />,
    meta: {
      label: "用户",
      icon: <Contact />,
    },
  },
];
//主路由
export const routes: routeType[] = [
  {
    path: "/",
    element: <Layout />,
    meta: {
      label: "首页",
    },
    children: routesChildren
  }
  , {
    path: "/login",
    element: <Login />,
    meta: {
      label: "登录",

    }
  },
  {
    path: "/mymessage",
    element: <MyMessage />,
    meta: {
      label: "消息",
    },
  },
  {
    path: "kepuhaozhu",
    element: <Kepuhao />,
    //进入默认显示的页面
    meta: {
      label: "科普号",
    },
    children: routeskepuhao,
  },
  {
    path: "/kepuhaoxq/:id",
    element: <Kepuhaoxq />,
    //进入默认显示的页面
    meta: {
      label: "详情",
    },
  },
  {
    path: "/homesearch",
    element: <HomeSearch />,
    meta: {
      label: "搜索",
    },
  },
  {
    path: '/knowledge/knowledgedetails',
    element: <Knowledgedetails />,
    meta: {
      label: '知识详情'
    }
  },
  {
    path: '/knowledge/viewall',
    element: <KnowledgeViewall />,
    meta: {
      label: '查看全部'
    }
  },
  {
    path: '/konwledSearch',
    element: <KonwledSearch />,
    meta: {
      label: '搜索'
    }
  },
  {
    path: '/Detailsofpopularscience',
    element: <Detailsofpopularscience />,
    meta: {
      label: '科普详情'
    }
  },
  {
    path: '/doctorsattention',
    element: <Doctorsattention />,
    meta: {
      label: '关注医生'
    }
  },
  {
    path: "/homeSearch",
    element: <HomeSearch />,
    meta: {
      label: "首页搜索",

    }
  },
  {
    path: "/homeSearch",
    element: <HomeSearch />,
    meta: {
      label: "首页搜索",

    }
  },
  {
    path: "/shenzhi",
    element: <Shenzhi />,
    meta: {
      label: "我的页面设置",

    }
  },
  {
    path: "/siren",
    element: <Siren />,
    meta: {
      label: "我的页面设置",

    }
  },
  {
    path: "/doxiao",
    element: <Doxiao />,
    meta: {
      label: "我的页面更多",

    }
  },
  {
    path: "/wodeys",
    element: <Wodeys />,
    meta: {
      label: "我的页面我的医生",
    }
  },
  {
    path: "/zhaoyiyuan",
    element: <Zhaoyiyuan />,
    meta: {
      label: "我的页面找医生",
    }
  },
  {
    path: "/liaotianshi",
    element: <Liaotianshi />,
    meta: {
      label: "我的页面我的聊天室",
    }
  },
  {
    path: "/shuoming",
    element: <Shuoming />,
    meta: {
      label: "我的页面底部说明",
    }
  },
  {
    path: "/wodeshi",
    element: <Wodeshi />,
    meta: {
      label: "我的页面我的诊室",
    }
  },
  {
    path: "/order",
    element: <Order />,
    meta: {
      label: "我的页面订单",
    }
  },
  {
    path: "/huanzhegl",
    element: <Huanzhegl />,
    meta: {
      label: "我的页面患者管理",

    }
  },
  {
    path: "/xiangqing",
    element: <Xiangqing />,
    meta: {
      label: "我的页面详情",

    }
  },
  {
    path: "/jiuzhen",
    element: <Jiuzhen />,
    meta: {
      label: "我的页面就诊管理",

    }
  }, {
    path: "/login",
    element: <Login />,
    meta: {
      label: "登录",

    }
  }, {
    path: '/knowledge/knowledgedetails',
    element: <Knowledgedetails />,
    meta: {
      label: '知识详情'
    }
  },
  {
    path: '/knowledge/viewall',
    element: <KnowledgeViewall />,
    meta: {
      label: '查看全部'
    }
  },

  {
    path: '/konwledSearch',
    element: <KonwledSearch />,
    meta: {
      label: '搜索'
    }
  },
  {
    path: "/huanzhegl",
    element: <Huanzhegl />,
    meta: {
      label: "我的页面患者管理",
    }
  },
  {
    path: "/huanzhejia",
    element: <Huanzhejia />,
    meta: {
      label: "我的页面患者管理",

    }
  },
  {
    path: "/huanzhejia",
    element: <Huanzhejia />,
    meta: {
      label: "我的页面患者管理",

    }
  },
  {
    path: "/yuer",
    element: <Yuer />,
    meta: {
      label: "我的页面余额",
    }
  },
  {
    path: "/sryisheng",
    element: <Sryisheng />,
    meta: {
      label: "我的页面私人医生专区",
    }
  },
  {
    path: "/mymessage",
    element: <Mymessage />,
    meta: {
      label: "消息页面",

    }
  },
  {
    path: '/knowledge/knowledgedetails',
    element: <Knowledgedetails />,
    meta: {
      label: '知识详情'
    }
  },
  {
    path: '/knowledge/viewall',
    element: <KnowledgeViewall />,
    meta: {
      label: '查看全部'
    }
  },
  {
    path: '/konwledSearch',
    element: <KonwledSearch />,
    meta: {
      label: '搜索'
    }
  },
  {
    path: "/login",
    element: <Login />,
    meta: {
      label: "登录",
    },
  },
  {
    path: "/phonelogin",
    element: <Phonelogin />,
    meta: {
      label: "手机号登录",
    },
  },
  {
    path: "/mymessage",
    element: <MyMessage />,
    meta: {
      label: "消息",
    },
  },
  {
    path: "/chartlt",
    element: <Chartlt />,
    //进入默认显示的页面
    meta: {
      label: "",
    },
  },
  {
    path: "/chartkf",
    element: <Chartltkf />,
    //进入默认显示的页面
    meta: {
      label: "",
    },
  },
  {
    path: "/kepuhaozhu",
    element: <Kepuhao />,
    //进入默认显示的页面
    meta: {
      label: "科普号",
    },
    children: routeskepuhao,
  },
  {
    path: "/kepuhaodating",
    element: <Kepuhaodating />,
    meta: {
      label: "科普号大厅",
    },
  },
  {
    path: "/kepuhaomyzan",
    element: <Kepuhaomyzan />,
    meta: {
      label: "",
    },
  },

  {
    path: "/kepuhaodatingsearch",
    element: <Kepuhaodatingsearch />,
    meta: {
      label: "科普号大厅跳转搜索",
    },
  },
  {
    path: "/kepuhaoxq/:id",
    element: <Kepuhaoxq />,
    //进入默认显示的页面
    meta: {
      label: "详情",
    },
  },
  {
    path: "/kepuhaoxqxq/:id",
    element: <Kepuhaoxqxq />,
    //进入默认显示的页面
    meta: {
      label: "详情2",
    },
  },
  {
    path: "/addhuanzhe",
    element: <Addhuanzhe />,
    //进入默认显示的页面
    meta: {
      label: "新增患者",
    },
  },
  {
    path: "/cunhuanzhe",
    element: <Cunhuanzhe />,
    //进入默认显示的页面
    meta: {
      label: "存储患者",
    },
  },
  {
    path: "/pay",
    element: <Pay />,
    //进入默认显示的页面
    meta: {
      label: "支付",
    },
  },
  {
    path: "/homesearch",
    element: <HomeSearch />,
    meta: {
      label: "搜索",
    },
  },
  {
    path: "/knowledge/knowledgedetails",
    element: <Knowledgedetails />,
    meta: {
      label: "知识详情",
    },
  },
  {
    path: "/knowledge/viewall",
    element: <KnowledgeViewall />,
    meta: {
      label: "查看全部",
    },
  },
  {
    path: "/konwledSearch",
    element: <KonwledSearch />,
    meta: {
      label: "搜索",
    },
  },
  {
    path: "/Detailsofpopularscience",
    element: <Detailsofpopularscience />,
    meta: {
      label: "科普详情",
    },
  },
  {
    path: "/doctorsattention",
    element: <Doctorsattention />,
    meta: {
      label: "关注医生",
    },
  },
  {
    path: "/homeSearch",
    element: <HomeSearch />,
    meta: {
      label: "首页搜索",
    },
  },
  {
    path: "/shenzhi",
    element: <Shenzhi />,
    meta: {
      label: "我的页面设置",
    },
  },
  {
    path: "/wodeshi",
    element: <Wodeshi />,
    meta: {
      label: "我的页面我的诊室",
    },
  },
  {
    path: "/order",
    element: <Order />,
    meta: {
      label: "我的页面订单",
    },
  },
  {
    path: "/huanzhegl",
    element: <Huanzhegl />,
    meta: {
      label: "我的页面患者管理",
    },
  },
  {
    path: "/login",
    element: <Login />,
    meta: {
      label: "登录",
    },
  },
  {
    path: "/knowledge/knowledgedetails",
    element: <Knowledgedetails />,
    meta: {
      label: "知识详情",
    },
  },
  {
    path: "/knowledge/viewall",
    element: <KnowledgeViewall />,
    meta: {
      label: "查看全部",
    },
  },
  {
    path: "/konwledSearch",
    element: <KonwledSearch />,
    meta: {
      label: "搜索",
    },
  },
  {
    path: "/huanzhegl",
    element: <Huanzhegl />,
    meta: {
      label: "我的页面患者管理",
    },
  },
  {
    path: "/huanzhejia",
    element: <Huanzhejia />,
    meta: {
      label: "我的页面患者管理",
    },
  },
  {
    path: "/siren",
    element: <Siren />,
    meta: {
      label: "我的页面私人医生专区",
    },
  },
  {
    path: "/sryisheng",
    element: <Sryisheng />,
    meta: {
      label: "我的页面私人医生专区",
    },
  },
  {
    path: "/mymessage",
    element: <Mymessage />,
    meta: {
      label: "消息页面",
    },
  },
  {
    path: "/knowledge/knowledgedetails",
    element: <Knowledgedetails />,
    meta: {
      label: "知识详情",
    },
  },
  {
    path: "/knowledge/viewall",
    element: <KnowledgeViewall />,
    meta: {
      label: "查看全部",
    },
  },
  {
    path: "/konwledSearch",
    element: <KonwledSearch />,
    meta: {
      label: "搜索",
    },
  },
  {
    path: "/pinpayment",
    element: <Pinpayment />,
    meta: {
      label: "挂珍支付",
    },
  },
  {
    path: "/review",
    element: <Review />,
    meta: {
      label: "评论",
    },
  },
  {
    path: "/knowledge/knowledgedetails",
    element: <Knowledgedetails />,
    meta: {
      label: "知识详情",
    },
  },
  {
    path: "/knowledge/viewall",
    element: <KnowledgeViewall />,
    meta: {
      label: "查看全部",
    },
  },
  {
    path: "/konwledSearch",
    element: <KonwledSearch />,
    meta: {
      label: "搜索",
    },
  },
  {
    path: "/zjzbmz",
    element: <Zjzbmz />,
    meta: {
      label: "专家值班门诊",
    },
  },
  {
    path: "/citylist",
    element: <CityList />,
    meta: {
      label: "城市列表",
    },
  },
  {
    path: "/zbyy",
    element: <Zbyy />,
    meta: {
      label: "直播义诊",
    },
  },
  {
    path: "/kuaisui",
    element: <KuaiSui />,
    meta: {
      label: "快速问医生",
    },
  },
  {
    path: "/kaiyiao",
    element: <KaiYiao />,
    meta: {
      label: "开药门诊",
    },
  },
  {
    path: "/tysj",
    element: <TySj />,
    meta: {
      label: "体检三甲",
    },
  },
  {
    path: "/weijianwei",
    element: <WeiJianWei />,
    meta: {
      label: "卫健委",
    },
  },
  {
    path: "/kfxl/:indexs",
    element: <KfXl />,
    meta: {
      label: "康复训练",
    },
  },
  {
    path: '/Identificationdetails',
    element: <IdentificationDetails />,
    meta: {
      label: "身份认证详情",
    }
  },
  {
    path: '/zbyzdetatils/:id',
    element: <ZbyzDetatils />,
    meta: {
      label: "直播义诊详情",
    }
  },
  {
    path: '/bxlist',
    element: <BxList />,
    meta: {
      label: "医生备选列表",
    }
  },
  {
    path: '/diagnosiscomment',
    element: <Diagnosiscomment />,
    meta: {
      label: '诊后评论'
    }
  },
  {
    path: '/recommendeddoctor',
    element: <Recommendeddoctor />,
    meta: {
      label: '推荐医生'
    }
  },
  {
    path: '/recommendedhospital',
    element: <Recommendedhospital />,
    meta: {
      label: '推荐医院'
    }
  },
  {
    path: '/recommendeddoctorfind',
    element: <RecommendeddoctorFind></RecommendeddoctorFind>,
    meta: {
      label: '医生详情'
    }
  }
  , {
    path: '/jyzx',
    element: <JyZx />,
    meta: {
      label: "救援中心",
    }
  },
  {
    path: '/jyrw',
    element: <JyRw />,
    meta: {
      label: "救援任务",
    }
  },
  {
    path: '/yhj',
    element: <Yhj />,
    meta: {
      label: "优惠卷",
    }
  },
  {
    path: '/wzj',
    element: <Wzj />,
    meta: {
      label: "问诊卷",
    }
  },
  {
    path:'/anyiyuanzhao',
    element:<AnYiYuanZhao />,
    meta:{
      label:'按医院找'
    }
  }
];
